package com.alipay.mapper;

import com.alipay.pojo.UserTransactionRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.ComponentScan;

import java.util.List;

@ComponentScan
@Mapper
public interface UserTransactionRecordMapper {
    /**
     * delete by primary key
     *
     * @param userTransactionRecordId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String userTransactionRecordId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(UserTransactionRecord record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(UserTransactionRecord record);

    /**
     * select by primary key
     *
     * @param userTransactionRecordId primary key
     * @return object by primary key
     */
    UserTransactionRecord selectByPrimaryKey(String userTransactionRecordId);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(UserTransactionRecord record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(UserTransactionRecord record);

    List<UserTransactionRecord> selectUserTransactionRecord(@Param("userId") Integer userId);
}
